<!DOCTYPE html>
<html lang="en">

<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
   <title>AdvForm</title>
   <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
   <link rel="stylesheet" href="./AdvForm.css">
</head>

<body>
   <div id="app">
      <!-- <mainFrame> -->
      <div>
         <div slot='content'>
            <ttForm v-model="form">
            </ttForm>
         </div>
      </div>
      <!-- </mainFrame> -->
   </div>


    <#include "/xhc/admin/components/scripts.html" />
   <script src="utils.js"></script>
   <script type="text/javascript">
      // import mainFrame from '@/components/mainFrame'
      // import utils from '../ttJs/utils.js'
      // import ttForm from '@/tt_components/ttForm'
      var vue = new Vue({
         // components: {
         //    mainFrame,
         //    ttForm
         // },
         el: '#app',
         data() {
            return {
               form: {
                  id: null,
                  url: '/xhc/admin/adv/submit',
                  items: [{
                        name: 'type',
                        value: ''
                     },
                     {
                        name: 'title',
                        value: '',
                        label: '广告标题',
                        placeholder: '请输入广告标题',
                        type: 'input',
                        rules: true,
                        msg: '广告标题不能为空'
                     },
                     {
                        name: 'image',
                        list: [],
                        label: '封面',
                        type: 'img',
                        url: '/xhc/api/upload',
                        limit: 1,
                        rules: true,
                        msg: '请选择一张封面'
                     },
                     {
                        name: 'images',
                        list: [],
                        label: '详情',
                        type: 'images',
                        url: '/xhc/api/upload',
                        rules: true,
                        msg: '请选择一张详情图片'
                     },
                  ],
               },
            }
         },
         mounted: function () {
            this.form.items[0].value = this.$route.query.type
         },
         methods: {
            
         }
      })
   </script>
</body>


</html>